@extends('admin.layout.index');
@section('css')
<link rel="stylesheet" href="/ad/css/pre_pare.css">
@endsection
@section('content')
<div class="mws-panel grid_8">
<form action="/admin/user/index" method="get">
	<div class="mws-panel-header">
   
    	<span><i class="icon-table"></i>相册列表</span>
    </div>
    <div class="mws-panel-body no-padding">
        <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper" role="grid">
        <div id="DataTables_Table_1_length" class="dataTables_length"><label>显示 
        <select size="1" name="count" aria-controls="DataTables_Table_1">
            <option value="10" @if($count == 10) selected @endif selected="selected" >10</option><option value="25" @if($count == 25) selected @endif>25</option>
            <option value="50" @if($count == 50) selected @endif>50</option><option value="100" @if($count == 100) selected @endif>100</option></select> 条</label></div>
        <div class="dataTables_filter" id="DataTables_Table_1_filter"><label>关键字: 
        <input aria-controls="DataTables_Table_1" type="text" name="search" value="{{$search}}"></label><input type="submit" value="查找" ></div>
        <table class="mws-datatable-fn mws-table dataTable" id="DataTables_Table_1" aria-describedby="DataTables_Table_1_info">
 </form>          
            <thead>
                <tr role="row"><th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 156px;" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">ID</th>
                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 97px;" aria-label="CSS grade: activate to sort column ascending">分类ID</th>
                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 212px;" aria-label="Browser: activate to sort column ascending">所属页面</th>
                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 212px;" aria-label="Browser: activate to sort column ascending">标题</th>
                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 197px;" aria-label="Platform(s): activate to sort column ascending">内容
                </th>
                 <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 197px;" aria-label="Platform(s): activate to sort column ascending">url地址
                </th>
                 <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 97px;" aria-label="CSS grade: activate to sort column ascending">图片</th>
                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 133px;" aria-label="Engine version: activate to sort column ascending">创建时间</th>
                <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 97px;" aria-label="CSS grade: activate to sort column ascending">是否禁用</th>
				<th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 97px;" aria-label="CSS grade: activate to sort column ascending">修改</th>
                </tr>
            </thead>
            
        <tbody role="alert" aria-live="polite" aria-relevant="all">
        	@foreach($data as $k=>$v)
        		<tr class="odd">
                    <td class="  sorting_1">{{$v['id']}}</td>
                    <td class=" ">{{ $v['cid']}}</td>
                    <td class=" "> 
                     @if($v['cate'] == 1)
                            首页
                     @elseif($v['cate'] == 2)
                            产品
                     @elseif($v['cate'] == 3)
                            商城
                     @elseif($v['cate'] == 4)
                            公告
                     @elseif($v['cate'] == 5)
                            服务  
                     @endif
                    </td>
                    <td class=" ">{{ $v['title']}}</td>
                     <td class=" ">{!! $v['count']!!}</td>
                     <td class=" ">{{ $v['url']}}</td>
                     <td class=" "> <img src="/upload/photo/{{ $v['pic']}}" alt="" style="width:50px"></td>
                     <td class=" ">{{ $v['createtime']}}</td>
                     <td class=" ">{{ $v['status']}}</td>
                    <td class=" " style="text-align:center">
                    	<a href="/admin/photo/delete/{{$v['id']}}"><i class="icon-trash" style="color:black" title="删除" onclick="return confirm('确认删除')"></i></a>
                    	<a href="/admin/photo/edit/{{$v['id']}}"><i class="icon-wrench" style="color:black;margin-left:15px" title="修改" onclick="return confirm('确认修改')"></i></a>
                    </td>
                </tr>
			@endforeach
                </tbody></table>
             
    			<div class="dataTables_info" id="pre_pare">
    			{!! $data->appends($request)->render() !!}
    			</div>
    </div>
</div>
@endsection